/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.*;

/**
 * <p>Project: javaseapp - MyUtils
 * <p>Powered by webrx On 2021-08-10 11:35:04
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class MyUtils<A, V> {
    public static void main(String[] args) {
        MyUtils<User, Student> mu = new MyUtils<>();
        mu.save(new User(1, "jack", 80));

        var ms = new MyUtils<Student, User>();
        ms.save(new Student(1, "李四", 30d));

    }

    public void add(V v) {

    }

    public void save(A t) {
        System.out.println("保存数据：" + t);
    }


    public static void set1(String[] args) {
        //泛型不支持基本类型int，请使用包装器类型 Integer
        List<String> list = new ArrayList<>();
        for (String s : list) {

        }
        Set<String> set = new HashSet<String>();
        Map<String, Object> map = new HashMap<String, Object>();
        var list2 = new ArrayList<Map<String, Object>>();

        Set<User> su = new HashSet<>();

    }

    public static void list1(String[] args) {
        List list = new ArrayList();
        list.add(1);
        list.add("hello");
        list.add(new Date());
        list.add(Calendar.getInstance());
        for (Object obj : list) {
            System.out.println(obj);
        }
    }
}
